package com.video4s.manager;

import org.apache.log4j.Logger;

import com.video4s.entity.UserYoutubeEntity;
import com.video4s.parser.Youtube;

public class ThreadQueueLink implements Runnable {
	private Youtube youtube = new Youtube();
	private static Logger logger = Logger.getLogger(ThreadQueueLink.class);
	private UserYoutubeEntity userYoutubeEntity;
	public ThreadQueueLink(UserYoutubeEntity userYoutubeEntity) {
		this.userYoutubeEntity = userYoutubeEntity;
	}
	@Override
	public void run() {
		// TODO Auto-generated method stub
		logger.info("## LINK GET YOUTUBE: " + userYoutubeEntity.getUserYoutubeLink() + " ID: "
				+ userYoutubeEntity.getUserYoutubeId());
		try {
			youtube.getListYou(userYoutubeEntity);
		} catch (Exception e) {
			logger.info("## ERROR Thread Link: ", e);
		}
	}

}
